package com.crm.service.followPlanManager;

import com.crm.model.entity.followPlanManager.CpFollowPlan;
import com.crm.model.qo.followPlanManager.CpFollowPlanQO;
import com.crm.model.vo.followPlanManager.CpFollowPlanVO;
import com.crm.model.vo.followPlanManager.FollowPlanContactListVO;
import com.crm.model.vo.followPlanManager.FollowPlanCountVO;

import java.util.List;

/**
 * @Author: chaifuyou
 * @date 2021/3/31 16:45
 */
public interface FollowPlanDbService {
    /**
     * 跟进计划列表
     * @return
     */
    List<CpFollowPlanVO> selectCustomerProductList(CpFollowPlanQO cpFollowPlanQO, String sortOrder, Integer dateUnit, Integer followUnit);

    /**
     * 添加跟进计划
     * @param cpFollowPlan
     */
    void addFollowPlan(CpFollowPlan cpFollowPlan);

    /**
     * 取消跟进计划
     * @param cpFollowPlanId
     * @return
     */
    void deleteFollowPlan(String cpFollowPlanId);

    /**
     * 修改跟进计划
     * @param cpFollowPlan
     * @return
     */
    void updateFollowPlan(CpFollowPlan cpFollowPlan);

    /**
     * 统计日期的跟进情况
     * @param planDate
     * @return
     */
    List<Integer> getFollowPlanCount(String planDate,String accountId,String startDate,String endDate);

    /**
     * 当天跟进的客户列表
     * @param planDate
     * @param order
     * @param accountId
     * @return
     */
    List<FollowPlanContactListVO> getFollowPlanListByDate(String planDate, StringBuilder order, String accountId,Integer dateUnit);

    /**
     * 根据客户获取一个联系人信息，取热度值最高的
     * @param customerId
     * @return
     */
    FollowPlanContactListVO getOneContactInfoByCustomerId(String customerId);

    /**
     * 根据id查询跟进信息
     * @param cpFollowPlanId
     * @return
     */
    CpFollowPlanVO selectFollowPlanInfoById(String cpFollowPlanId);
}
